package xyz.chenyongpeng.utils;

import java.text.DecimalFormat;

public class LowerPrice {
    /**
     * 保留两位小数
     * @param price
     * @return
     */
    public static String getLowerPrice(String price){
        DecimalFormat df = new DecimalFormat("#.00");
        float myPrice = Float.parseFloat(price) / 100;
        return df.format(myPrice);
    }

    public static void main(String[] args) {
        System.out.println(getLowerPrice("110.1234"));
    }
}
